package com.zn.opit.shirodemo.exception;

import lombok.Getter;

@Getter
public enum ShiroDemoExceptionTypes implements ExtExceptionInfo {

    // 未知
    UNKNOWN_EXP("UNKNOWN_EXP", "未知异常"),

    // 业务
    NO_LOGIN("NO_LOGIN", "您还未登陆，请先进行登陆"),
    LOGIN_USER_CREDENTIALS_FAILED("LOGIN_USER_CREDENTIALS_FAILED", "用户名或密码错误！"),
    LOGIN_USER_BE_LOCKED("LOGIN_USER_BE_LOCKED", "用户被锁定！"),
    LOGIN_USER_ATTEMPTS_TOO_MUCH("LOGIN_USER_ATTEMPTS_TOO_MUCH", "用户名或密码错误次数过多"),
    ;

    final String code;
    final String msg;

    ShiroDemoExceptionTypes(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
